# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Kuba Serafinowski <zizzfizzix(at)gmail(dot)com>

pkgname=owncloud-client
pkgver=3.2.1.10355
pkgrel=1
pkgdesc='ownCloud client based on mirall'
arch=(loong64 x86_64)
url='http://owncloud.org/'
license=(GPL2)
depends=(qtkeychain hicolor-icon-theme libcloudproviders)
makedepends=(extra-cmake-modules python-sphinx qt5-tools doxygen kio libre-graph-api)
optdepends=('python-nautilus: integration with Nautilus' 'nemo-python: integration with Nemo' 'python-caja: integration with Caja')
backup=('etc/ownCloud/sync-exclude.lst')
source=(https://download.owncloud.com/desktop/ownCloud/stable/$pkgver/source/ownCloud-$pkgver.tar.xz{,.asc})
sha256sums=('ef2b817c80bee527946e3d77123597561f2b15a1cad457c75f1ce5fb7f723ee2'
            'SKIP')
validpgpkeys=(F05F7DD7953A07DF36579DAA498C45EBE94E7B37) # ownCloud Client Team (Signing Key) <info@owncloud.com>

build() {
  cmake -B build -S ownCloud-$pkgver \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DDATADIR=share
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
}
